home *** CD-ROM | disk | FTP | other *** search
- /**/
-
- signal on halt
- signal on break_c
-
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
-
- /*call setrxmuistack(512000)*/
- call rxmuiopt("debugmode showerr")
-
- call createApp
-
- call set("win","open",1)
- call getattr("win","open","o")
- if o=0 then do
- say "can't open window"
- exit
- end
-
- call handleApp
- exit
- /***********************************************************************/
- handleApp: procedure
-
- ctrl_c=2**12
- s=0
- do forever
- call handle("APP","H",s)
- do i=0 to h.num-1
- if h.i="QUIT" then do
- exit
- call set("win","open",0)
- exit
- end
- say h.num-1 h.i
- end
- s=Wait(or(h.signals,ctrl_c))
- if and(s,ctrl_c)>0 then exit
- end
- /* never reached */
- /***********************************************************************/
- err: procedure expose sigl rxmuierror
- parse arg res
- say sigl "["res"]"
- say getrxmuistring(res) "in line" sigl-1 rxmuierror
- exit
- /***********************************************************************/
- createApp: procedure
- app.Title="MailText"
- app.Version="$VER: MailText 1.0 (10.12.99)"
- app.Copyright="©1999, alfie"
- app.Author="alfie"
- app.Description="MailText example"
- app.Base="MailText"
- app.SubWindow="WIN"
- win.ID="MAIN"
- win.Title="Mailtext Example"
- win.Contents="MGROUP"
- mgroup.0="nlv"
- nlv.class="nlistview"
- nlv.frame="READLIST"
- nlv.list="mt"
- nlv.input=1
- mt.font="fixed"
- mt.class="mailtext"
- mt.text=ParseText("Alfonso Ranieri\n\nmailto:alforan@tin.it\nhttp://web.tiscalinet.it/amiga/rxmui/")
- mgroup.1="gb"
- gb.class="group"
- gb.horiz=1
- gb.0=Label("May also use this special text object:")
- gb.1="b"
- b.class="text"
- b.inputmode="toggle"
- b.frame="none"
- b.background="windowback"
- b.showselstate=0
- b.contents="Ciao"
-
- res=NewObj("APPLICATION","APP")
- if res~=0 then do
- ioerr=IoErr()
- say ioerr
- call err(res)
- end
-
- call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
-
- say Notify("B","PRESSED","everytime","APP","RETURNID")
-
- return
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
-